#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/init.h>
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
#include <asm/smp.h>
#include <asm/ipi.h>
+#else
+#include <asm/apic.h>
+#include <asm/apicdef.h>
+#include <asm/genapic.h>
+#endif
#include <xen/evtchn.h>
DECLARE_PER_CPU(int, ipi_to_irq[NR_IPIS]);
local_irq_restore(flags);
}
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
static int xen_apic_id_registered(void)
{
/* better be set */
Dprintk("%s\n", __FUNCTION__);
return physid_isset(smp_processor_id(), phys_cpu_present_map);
}
+#endif
static unsigned int xen_cpu_mask_to_apicid(cpumask_t cpumask)
{
struct genapic apic_xen = {
.name = "xen",
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
.int_delivery_mode = dest_LowestPrio,
+#endif
.int_dest_mode = (APIC_DEST_LOGICAL != 0),
.int_delivery_dest = APIC_DEST_LOGICAL | APIC_DM_LOWEST,
.target_cpus = xen_target_cpus,
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
.apic_id_registered = xen_apic_id_registered,
+#endif
.init_apic_ldr = xen_init_apic_ldr,
.send_IPI_all = xen_send_IPI_all,
.send_IPI_allbutself = xen_send_IPI_allbutself,